<#include "/common/header.html" />

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">
            	 <div class="ibox-title">
                     <h5>添加用户</h5>
                 </div>
                 <div class="ibox-content">
                 		<form method="post" action="add" enctype="multipart/form-data" class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户编码</label>
                                <div class="col-sm-10">
                                    <input name="userCode" type="text" class="form-control">
                                    <span class="help-block m-b-none">用户编码唯一</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户名称</label>
                                <div class="col-sm-10">
                                    <input type="text" name="userName" class="form-control"> 
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" name="userPassword">
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">确认密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" name="reuserPassword">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">性别</label>
                                <div class="col-sm-10">
                                        <label><input type="radio" class="radio i-checks" checked="" value="0" name="gender"> <i></i> 男</label>
                                        <label><input type="radio" class="radio i-checks" value="1" name="gender"> <i></i> 女</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">出生日期</label>
                                <div class="col-sm-10">
                                	<input type="text" class="form-control" name="birthday"
                                	placeholder="点击选择出生日期"
                                	readonly="readonly" onclick="WdatePicker();">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户电话</label>
                                <div class="col-sm-10">
                                	<input type="text" class="form-control" name="phone" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户地址</label>
                                <div class="col-sm-10">
                                <input type="text" class="form-control" name="address" />
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">用户角色</label>
                                <div class="col-sm-10">
                                	<select class="form-control" name="userRole">
                                		<option value="0">请选择</option>
                                		<#list roleList as role>
                                			<option value="${role.id}">${role.roleName}</option>	
                                		</#list>
                                	</select>
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">证件照</label>
                                <div class="col-sm-10">
                                	<input type="file" class="form-control" name="idPicFile" />
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-danger" type="button" onclick="history.back()">返回</button>
                                    <button class="btn btn-primary" type="button" id="ajaxSubmit">ajax保存内容</button>
                                    
                                </div>
                            </div>
                        </form>
                 </div>
            </div>
        </div>
    </div>
<#include "/common/footer.html" />  
<script type="text/javascript">
  	$(function(){
  		$("#ajaxSubmit").click(function(){
  			ajax("/user/get/1","get","",function(res){
  				//业务部分
  				alert("回调函数处理结果"+res.data)
  			});
  		})
  		
  	})
  </script>
</body>
</html>